package com.dubbo.snail.service;

import com.alibaba.csp.sentinel.adapter.servlet.callback.UrlCleaner;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * @Description TODO
 * @Author xueguoping
 * @Date 2021/5/11 10:59
 */
@Service
public class CustomerUrlCleaner implements UrlCleaner {
	public String clean(String originUrl) {
		if(StringUtils.isEmpty(originUrl))
			return originUrl;

		if(originUrl.startsWith("/clean/"))
			return "/clean/*";
		return originUrl;
	}
}
